const KEY = 'geek-pc-token'

const setToken = token => {
  localStorage.setItem(KEY, token)
}

const getToken = () => {
  return localStorage.getItem(KEY)
}

const removeToken = () => {
  localStorage.removeItem(KEY)
}

const isAuth = () => {
  return getToken()
}

export { setToken, getToken, removeToken, isAuth }
